import { options, handleResponse, handleError } from './include'


export function getExternalLinkInfo(getExternalLinkInfo) {
    return fetch("api/ExternalLinkManager/getExternalLinkInfo", { ...options, body: JSON.stringify(getExternalLinkInfo) }).then(handleResponse).catch(handleError)
}

export function upadteExternalLink(upadteExternalLink) {
    console.log("2",JSON.stringify(upadteExternalLink))
    return fetch("api/ExternalLinkManager/upadteExternalLink", { ...options, body: JSON.stringify(upadteExternalLink) }).then(handleResponse).catch(handleError)
}
export function deleteExternalLink(deleteExternalLink) {
    return fetch("api/ExternalLinkManager/deleteExternalLink", { ...options, body: JSON.stringify(deleteExternalLink) }).then(handleResponse).catch(handleError)
}

export function createExternalLink(createExternalLink) {
    return fetch("api/ExternalLinkManager/createExternalLink", { ...options, body: JSON.stringify(createExternalLink) }).then(handleResponse).catch(handleError)
}
export function getExternalLinks(getExternalLinks) {
    return fetch("api/ExternalLinkManager/getExternalLinks", { ...options, body: JSON.stringify(getExternalLinks) }).then(handleResponse).catch(handleError)
}

